<!-- 404 -->
<template>
  <div class="notFound">
    <div class="notFound-img">
      <img src="@/assets/image/404.png" alt="404" />
      <img
        class="notFound-img-child left"
        src="@/assets/image/404_cloud.png"
        alt="404"
      />
      <img
        class="notFound-img-child mid"
        src="@/assets/image/404_cloud.png"
        alt="404"
      />
      <img
        class="notFound-img-child right"
        src="@/assets/image/404_cloud.png"
        alt="404"
      />
    </div>
    <div class="text">
      <h2>页面没有找到</h2>
      <p>很抱歉，您访问的页面不存在！</p>
      <el-button type="text" @click="$router.back(-1)"> 返回上一页 </el-button>
      <el-button v-if="isLogin" type="text" @click="$router.push('/')">
        返回首页
      </el-button>
    </div>
  </div>
</template>

<script>

export default {
  computed: {
    
  },
};
</script>
<style lang="scss">
// 404
.animation {
  opacity: 0;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-delay: 1s;
}

.notFound {
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  background: #fff;

  &-img {
    position: relative;

    &-child {
      position: absolute;

      &.left {
        @extend .animation;
        width: 80px;
        animation-name: cloudLeft;
      }

      &.mid {
        @extend .animation;
        width: 46px;
        animation-name: cloudMid;
        animation-delay: 0.9s;
      }

      &.right {
        @extend .animation;
        width: 62px;
        animation-name: cloudRight;
      }
    }
  }

  img {
    width: 500px;
  }

  .text {
    margin-top: -30px;
    line-height: 1.2;
    color: #424954;

    h1 {
      font-size: 42px;
      font-weight: bold;
    }

    h2 {
      font-size: 34px;
    }

    p {
      font-size: 24px;
    }
  }

  a {
    margin-top: 50px;
    display: inline-block;
  }
}

@keyframes cloudLeft {
  0% {
    top: -60px;
    left: 170px;
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    top: 97px;
    left: 60px;
    opacity: 0;
  }
}

@keyframes cloudMid {
  0% {
    top: 40px;
    left: 320px;
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    top: 180px;
    left: 100px;
    opacity: 0;
  }
}

@keyframes cloudRight {
  0% {
    top: 80px;
    left: 350px;
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    top: 280px;
    left: 200px;
    opacity: 0;
  }
}
</style>
